#ifndef CLK_ISD1420_H
#define CLK_ISD1420_H

#include "common.h"
#include "8255.h"

#define CRL_ISD1420  0x272      // Use port C in 8255 to control isd1420
#define ADDR_ISD1420 0x271      // Address of record/play

// Each record has only 1.125s
#define ADDR_0   0x00
#define ADDR_1   0x09
#define ADDR_2   0x12
#define ADDR_3   0x1b
#define ADDR_4   0x24
#define ADDR_5   0x2d
#define ADDR_6   0x36
#define ADDR_7   0x3f
#define ADDR_8   0x48
#define ADDR_9   0x51
#define ADDR_10  0x5a
#define ADDR_TIP 0x63

void initisd1420(u8 *mode);
void stopISD(u8 *mode);
void recISD(u8 *mode, u8 startAddr);
void playISD(u8 *mode, u8 startAddr);
void recSubProgram(u8 *mode, u8 startAddr);
void playSubProgram(u8 *mode, u8 startAddr);
void scanVoicePlayFlag(u8 *mode, u8 *flag, u8 hour);

#endif